package com.bkgy.modularbx.temperature1870.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bkgy.commom.model.QueryDTO;
import com.bkgy.modularbx.temperature1870.domain.FurnaceTemperature1870;
import com.bkgy.modularbx.temperature1870.dto.SearchCondition1870;
import com.bkgy.modularbx.temperature1870.service.FurnaceTemperatureService1870;
import com.bkgy.sys.common.entity.ResultData;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

@Tag(name = "获取炉温数据", description = "1870产线")
@RestController
@RequestMapping("/furnace1870")
@Validated
public class FurnaceTemperatureController1870 {

    //@Autowired
    @Resource
    private FurnaceTemperatureService1870 furnaceTemperatureService1870;

    @Operation(summary = "炉温数据", description = "根据入口卷号、出口卷号、入口钢种查询炉温信息")
    @PostMapping("/page")
    public ResultData<Page<FurnaceTemperature1870>> page(@Parameter(description = "查询条件和分页信息") @RequestBody @Valid QueryDTO<SearchCondition1870> queryDTO) {
        return furnaceTemperatureService1870.pageDataCollection(queryDTO);
    }
}
